<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>BIM工程</title>
	<link rel="stylesheet" href="index.css">
	<link rel="stylesheet" href="zTreeStyle.css" type="text/css">
	<!-- 		<link rel="stylesheet" type="text/css" href="../../css/index.css"> -->
	<link rel="stylesheet" href="../../css/bootstrap.min.css" />
	<link rel="stylesheet" href="../../css/bootstrap-select.min.css" />
	<link rel="stylesheet" href="../../css/index.css" />
	<link rel="stylesheet" type="text/css" href="../../layui/css/layui.css" />
	<link rel="stylesheet" type="text/css" href="static/viewer/viewer.min.css" />
	<script type="text/javascript">
		document.documentElement.style.fontSize = document.documentElement.clientWidth / 19.2 + 'px';
	</script>
	<script src="jquery.min.js"></script>
	<script src="jquery.ztree.all.min.js"></script>
	<script src="../../js/baseUrl.js"></script>
	<script src="../../js/utils.js"></script>
	<script src="static/viewer/viewer.min.js"></script>

	<!-- <script src="https://lbdp.lubansoft.com/reference/motor-web-library/motor.js"></script> -->
	<!-- <script src="../../library/motor.js"></script> -->
	<!--<script src="../common/common.js"></script>-->
	<script src="../common/config.js"></script>
	<script src="../../js/mapStyle.js"></script>
	
	<style>
		.u2019 {
			border-width: 0px;
			position: absolute;
			left: 0px;
			top: 30px;
			width: 70px;
			height: 30px;
			display: flex;
			color: rgba(242, 242, 242, 0.8);
			background-color: rgba(27, 55, 66, 0.996078431372549);
			text-align: center;
		}

		#u2032_div {
			border-width: 0px;
			position: absolute;
			left: 0px;
			top: 0px;
			width: 190px;
			height: 30px;
			background: inherit;
			background-color: rgba(27, 55, 66, 0.996078431372549);
			box-sizing: border-box;
			border-width: 1px;
			border-style: solid;
			border-color: rgba(215, 215, 215, 1);
			border-radius: 0px;
			-moz-box-shadow: none;
			-webkit-box-shadow: none;
			box-shadow: none;
			font-family: 'Microsoft YaHei Regular', 'Microsoft YaHei';
			font-weight: 400;
			font-style: normal;
			font-size: 16px;
			color: #F2F2F2;
			text-align: left;
			line-height: 22px;
		}

		.bim-whole {
			z-index: 2;
		}

		.selected {
			font-weight: bold;
			background: #ff99cc;
			color: #fff;
		}

		.left-down {
			width: auto !important;
		}

		.left-down select {
			width: 2rem;
		}

		.left-bg4 {
			width: 4rem;
			height: 73vh;
		}

		.left-list {
			width: auto;
		}

		.select-list ol {
			width: 3rem;
			height: 3.5rem;
			margin-top: 0.2rem;
			border: 1px solid #0EB2FD;
			padding: 0.14rem;
			border-radius: 3px;
			overflow-y: auto;
		}

		.selected {
			background: #0EB2FD;
		}

		.left-down input {
			border-color: #0EB2FD;
			width: 2rem;
			border-radius: 8px;
			height: 36px;
			background: none;
			box-sizing: border-box;
		}

		.cesium-viewer-fullscreenContainer {
			top: 100px;
		}

		.topBg {
			position: absolute;
			z-index: 2;
			top: 0;
		}

		.detailModel {
			position: absolute;
			top: 0;
			bottom: 0;
			left: 0;
			right: 0;
			margin: auto;
			width: 80%;
			height: 80%;
			z-index: 999;
			background-color: #1D2127;
			border: 1px solid rgb(14, 177, 253) !important;
		}
		.m-xq-con,
		.m-sj-con {
			position: absolute;
			top: 0;
			bottom: 0;
			left: 0;
			right: 0;
			margin: auto;
			width: 100%;
			height: 100%;
			z-index: 1000;
			background-color: #1D2127;
			border: 1px solid rgb(14, 177, 253) !important;
		}
		.layui-layer-shade {
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
			position: fixed;
			pointer-events: auto;
		}

		#infoBox {
			top: 100px;
		}

		#gbclod {
			float: right;
			width: 20px;
			height: 20px;
			margin: 15px;
			cursor: pointer;
		}
		.model-close i {
			float: right;
			width: 20px;
			height: 20px;
			margin: 15px;
			cursor: pointer;
		}
		.model-menu {
			overflow: hidden;
			widows: 100%;
			padding-top: 20px;
			padding-left: 20px;
		}

		.model-menu a {
			float: left;
			height: 41px;
			padding: 0 20px;
			line-height: 41px;
			border-radius: 4px;
			margin: 10px 6px;
			color: #fff;
			font-size: 18px;
			text-align: center;
			text-decoration: none;
			background-color: #12a9fd;
			margin-right: 20px;
		}

		.model-menu .active {
			background-color: #19c5c1;
		}

		table,
		tr,
		td {
			border-collapse: collapse;
			border-spacing: 0;
			margin: 0;
			padding: 0;
		}

		.table>thead>tr>th,
		.table>tbody>tr>th,
		.table>tfoot>tr>th,
		.table>thead>tr>td,
		.table>tbody>tr>td,
		.table>tfoot>tr>td {
			border: 1px solid #2C3846;
		}

		.table>thead>tr>th,
		.table>tbody>tr>th,
		.table>tfoot>tr>th,
		.table>thead>tr>td,
		.table>tbody>tr>td,
		.table>tfoot>tr>td {
			padding: 8px;
			line-height: 1.42857143;
			vertical-align: top;
			border-top: 1px solid #2C3846;
		}

		.table th {
			/* background-color: #618799 !important;
			border: none !important; */
			text-align: left;
		}

		.table thead {
			border-top: 1px solid #2C3846;
		}

		#menu1,
		#menu2,
		#menu3,
		#menu4,
		#menu5,
		.xq-con,
		.sj-con {
			padding: 20px;
		}

		.m-con {
			display: none;
		}

		.model-con {
			overflow-y: auto;
		}

		.zc-btn,
		.tz-yl,
		.tz-download,
		.sj-download {
			width: 150px;
			height: 30px;
			border-radius: 4px;
			/* margin: 10px 6px; */
			color: #fff;
			font-size: 16px;
			text-align: center;
			text-decoration: none;
			background-color: #12a9fd;
			line-height: 30px;
			cursor: pointer;
		}

		.zc-btn:hover,
		.tz-yl:hover,
		.tz-download:hover,
		.sj-download:hover {
			background-color: #19c5c1;
		}

		.zc-btn:active,
		.tz-yl:active,
		.tz-download:active,
		.sj-download:active {
			opacity: 0.8;
		}
	</style>
</head>

<body id="contentBody">
	<!--顶部logo样式-start-->
	<!--<div class="row topBg">-->
		<!--<div class="lan"></div>-->
		<!--<div class="col-md-3 text-left widauto">-->
			<!--<div class="show-time" id="topTab">-->
				<!--<a href="../../homepage.html" class="homePage"></a>-->
				<!--<a href="../../index.html" class="gis"></a>-->
				<!--<a href="javascript:void(0)" class="bim curr"></a>-->
			<!--</div>-->
		<!--</div>-->
		<!--<div class="col-md-6" style="margin-top: 10px;">-->
			<!--<div class="bigTile"></div>-->
		<!--</div>-->
		<!--<div class="col-md-3">-->
			<!--<div class="title-right">-->
				<!--&lt;!&ndash; 屏蔽中联国际图表 &ndash;&gt;-->
				<!--&lt;!&ndash; <img data-toggle="modal" data-target="" src="./img/logo.png" title="logo" /> &ndash;&gt;-->
			<!--</div>-->
		<!--</div>-->
	<!--</div>-->

	<div class="row topBg">
		<div class="text-left widauto" style="float: left">
			<div class="show-time" id="topTab">
				<a href="../../homepage.html" class="homePage"></a>
				<a href="../../index.html" class="gis"></a>
				<a href="javascript:void(0)" class="bim curr"></a>
			</div>
		</div>
		<div class="" style="width: 50%;margin: 0 auto;margin-top: 0.3rem;;">
			<div class="bigTile"></div>
		</div>
		<div class="rightPart" style="float: right">
			<!--<div class="layui-inline calendar">-->
				<!--<div class="layui-inline">-->
					<!--<input type="text" class="layui-input test-item" id="startInput" placeholder="开始时间">-->
				<!--</div>-->
				<!-- - -->
				<!--<div class="layui-inline">-->
					<!--<input type="text" class="layui-input test-item" id="endInput" placeholder="结束时间">-->
				<!--</div>-->
			<!--</div>-->

			<!-- 暂时屏蔽中联国际logo -->
			<img data-toggle="modal" data-target="" src="../../img/红白logo.png" title="logo"/>
		</div>
	</div>


	<!--顶部logo样式-end-->

	<!-- 页面加载动画-start -->
	<div id="loading">
		<div class="loading-image" style="background-image:url('./img/ezgif.com-crop.gif');">
			<div
				style="text-align: center;vertical-align: middle;display: table-cell;color: white;height: 100px;padding-top: 80px;margin-top: 80px;">
				正在努力加载中...</div>
		</div>
	</div>
	<div id='container' style="position:inherit"></div>
	<!-- 页面加载动画-end -->


	<!-- 资产详情弹框-start -->
	<div class="layui-layer-shade" id="layui-layer-shade2" times="2"
		style="z-index: 888; background-color: rgb(0, 0, 0); opacity: 0.3;display:none;"></div>
	<div class="detailModel" style="display:none;">
		<!-- 详情关闭按钮 -->
		<div class="model-close">
			<i id="gbclod"><img src="../../img/icon.png" alt=""></i>
		</div>
		<div style="display: none;">
			<a href="javascript:void(0)" onclick="showZcDetail('W1269LS3202001ZM00142X320200')">道路路段</a>
			<a href="javascript:void(0)" onclick="showZcDetail('ysk001')">检查井</a>
			<a href="javascript:void(0)" onclick="showZcDetail('W1269LS3202001BZ00006X320200')">桥梁</a>
			<a href="javascript:void(0)" onclick="showZcDetail('W1269LS3202001BZ00003X320200')">隧道</a>
			<a href="javascript:void(0)" onclick="showZcDetail('dlfuss001')">附属设施</a>
		</div>
		<!-- 详情菜单框 -->
		<div class="model-menu">
			<a href="javascript:void(0)" conid="menu1" class="active">基本信息</a>
			<a href="javascript:void(0)" conid="menu2">参数信息</a>
			<a href="javascript:void(0)" conid="menu3">管理信息</a>
			<a href="javascript:void(0)" conid="menu4">价值信息</a>
			<a href="javascript:void(0)" conid="menu5">位置信息</a>
		</div>
		<!-- 详情内容区 -->
		<div class="model-con">
			<div class="m-con" id="menu1">
			</div>
			<div class="m-con" id="menu2">

			</div>
			<div class="m-con" id="menu3">

			</div>
			<div class="m-con" id="menu4">

			</div>
			<div class="m-con" id="menu5">

			</div>
		</div>
		<!-- 详情图纸预览 -->
		<div class="m-xq-con" style="display: none;">
			<!-- 图纸预览关闭按钮 -->
			<div class="model-close">
				<i id="gbclod2"><img src="../../img/icon.png" alt=""></i>
			</div>
			<!--  -->
			<div class="xq-con">
				<table class="table" style="margin-bottom: 0;">
					<tr>
						<th>图册编码*</th>
						<td></td>
						<th>图册名称*</th>
						<td></td>
					</tr>
				</table>
				<table class="table" style="margin-bottom: 0;margin-top:20px;">
					<tr>
						<th>图纸明细</th>
						<td>图纸下载</td>
					</tr>
				</table>
				<table class="table" style="margin-bottom: 0;margin-top:20px;">
					<tr>
						<td>图纸编号</td>
						<td>图纸名称</td>
						<td>图纸预览</td>
					</tr>
				</table>
			</div>
		</div>
		<!-- 详情随机资料 -->
		<div class="m-sj-con" style="display: none;">
			<div class="model-close">
				<i id="gbclod3"><img src="../../img/icon.png" alt=""></i>
			</div>
			<div class="sj-con">
				<table class="table" style="margin-bottom: 0;">
					<tr>
						<th>随机资料编码</th>
						<td></td>
						<th>随机资料</th>
						<td></td>
					</tr>
				</table>
			</div>
		</div>
	</div>
	<!-- 资产详情弹框-end -->


	<!-- 道路设施左边菜单-start -->
	<div class="bim-whole" style="display: block;">
		<div class="nav left-bg4">
			<span>
				<i><img src="img/fyj.png" alt="" /></i>
				<h3>道路设施</h3>
			</span>
			<div class="left-list select-wrap">
				<ul>
					<li class="left-down">
						<label>道路</label>
<!--						<select name="道路选择" id="roadSelect" onchange="roadselectByRoadID()">-->
<!--							<option value=" ">-请选择-</option>-->
<!--						</select>-->
						<form class="layui-form" style="display: inline-block">
							<div>
								<select name="道路选择" id="roadSelect" lay-search lay-filter="roadSelect">
									<option value=" ">-请选择-</option>
								</select>
							</div>
						</form>
					</li>
					<li class="left-down">
						<label>路段</label>
						<select name="路段选择" id="roadSeletionSelect">
							<option value=" ">-请选择-</option>
						</select>
					</li>
					<li class="left-down">
						<label>其他设施</label>
						<select name="其他设施" id="roadAssetClass" onchange="roadAssetDetailByClass()">
							<option value=" ">-请选择-</option>
						</select>
					</li>
					<li class="left-down">
						<!-- <input type="search"  id="searchContent" /> -->
						<select name="其他设施" id="roadAssetClass4">
							<option value=" ">-请选择-</option>
						</select>
						<label class="search-btn">
							<img src="./img/4.png" alt="" />
						</label>
					</li>
				</ul>
				<!-- 选择内容列表 -->
				<div class="select-list">
					<ol id="dataListPlay">
						<li>无</li>
					</ol>
				</div>
			</div>
		</div>
	</div>
	<div id='infoBox' style="display: none;"></div>
	<div class="tree_container" style="display: none;">
		<ul id="treeDemo" class="ztree"></ul>
	</div>

	<!-- 道路设施左边菜单-end -->

	<ul class='btns'>
		<li class='camera_reset' style='background: url("./static/images/ic_xiangji.png") no-repeat center'
			title="相机复位">
		</li>
		<li class="cim_bim" style='background: url("./static/images/ic_map.png") no-repeat center' title="地图显隐"></li>
		<li class="section" style='background: url("./static/images/ic_pouqie.png") no-repeat center;' title="剖切"></li>
		<li class="selectd" style='background: url("./static/images/ic_kuangxuanfangda.png") no-repeat center'
			title="框选放大"></li>
		<!-- let autoRoamManger = new Motor.AutoRoamManager(viewer);//传入Motor.Viewer对象 -->
		<li class="roam" style='background: url("./static/images/ic_manyou.png") no-repeat center' title="漫游"></li>
		<li class="map_serve" style='background: url("./static/images/ic_map_serve.png") no-repeat center'
			title="切换地图服务"></li>
		<li class="edge"
			style='background: url("./static/images/ic_hide.png") no-repeat center;background-size: 50px 36px;'
			title="边线开关"></li>
		<li class="antialias"
			style='background: url("./static/images/ic_kjc_hover.png") no-repeat center;background-size: 50px 36px;'
			title="抗锯齿"></li>
	</ul>
	<div class="section_box_container">
		<select name="section_box" id="section_box">
			<option value="X">X</option>
			<option value="Y">Y</option>
			<option value="Z">Z</option>
			<option value="XYZ">XYZ</option>
		</select>
		<!-- <button id="togglePlane">剖面显隐</button> -->
		<div id='togglePlane'
			style='background: url("./static/images/ic_display.png") no-repeat center;background-size: 50px 36px;'
			title="剖面显隐"></div>
	</div>
	<!-- <ul class="section_box">
        <li>X</li>
        <li>Y</li>
        <li>Z</li>
        <li>XYZ</li>
    </ul> -->
	<div class="roam_box">
		<ul>
			<!-- 开启录制, 每隔一秒添加一次相机姿态 -->
			<li><button class="Record">录制路径漫游动画</button>&nbsp;&nbsp;&nbsp;<span>正在录制中 ...</span></li>
			<!-- 关闭录制 -->
			<li><button class="closeRecord">关闭录制</button></li>
			<li><button class="router_file">导入路径文件</button></li>
			<!-- autoRoamManger.addPose() -->
			<li><button class="addPose">添加位置</button></li>
			<!-- autoRoamManger.playRoam(); -->
			<li><button class="playRoam">播放路径</button></li>
			<!-- autoRoamManger.stopRoam(); -->
			<li><button class="stopRoam">停止播放</button></li>
			<!-- autoRoamManger.emptyRoutes(); -->
			<li><button class="emptyRoutes">清空路径</button></li>
			<!-- console.log(JSON.stringify(autoRoamManger.cameraPoses)); -->
			<li><button class="consoleRoam">打印路径</button></li>
			<li>
				<div class="hr"></div>
			</li>
			<!-- viewer.navigationMode = Motor.NavigationMode.ROAM; -->
			<li><button class="first_person">开启全景漫游</button></li>
			<li><button class="first_person_close">关闭全景漫游</button></li>
			<!-- viewer.roamEditor.movementSpeed = 10; -->
			<li><b>移动速度</b>&nbsp;&nbsp;&nbsp;<input class="speed" type="range" min="1" max="20" value='1' step='1'></li>
			<!-- viewer.roamEditor.isGravitative = false; -->
			<li><input class="isGravitative " checked type="checkbox">&nbsp;&nbsp;&nbsp;<b>重力</b></li>
		</ul>
	</div>
	<ul class="map_serve_box">
		<li style="background:url('./static/images/ImageryProviders/bingAerial.png')" title="Bing"></li>
		<li style="background:url('./static/images/ImageryProviders/sentinel-2.png')" title="天地图"></li>
		<li style="background:url('./static/images/ImageryProviders/esriWorldImagery.png')" title="ArcGIS"></li>
		<li style="background:url('./static/images/ImageryProviders/WMTS.png')" title="WMTS"></li>
	</ul>
	<div id="contextContainer">
		<ul id="contextmenu">
			<li class="li">构件详情</li>
			<hr class="hr">
			<li class="li">隐藏选中</li>
			<li class="li">半透明选中</li>
			<li class="li">隔离选中</li>
			<hr class="hr">
			<li class="li">还原所有</li>
			<hr class="hr">
			<li class="li">资产详情</li>
		</ul>
	</div>
	<script src="../../layui/layui.js"></script>
	<script src="bim.js"></script>
	<script>
		// $('#btnRoad').on('click',function(){
		// 	alert("test");
		// })
		$('.section_box_container').hide();
		// $('#infoBox').hide();
		// $('.tree_container').hide();
		// $('.btns').hide();
		var isInSubScene = false,
			parentComponent;
		const parameters = window.location.search.substring(1).split('&');
		const paramObj = {};
		var currentSelectedComponent, selectedComponents = [],
			isolatedComponents = [],
			hiddenComponents = [],
			transparentComponents = [];

		parameters.forEach(function (ele) {
			let keyvalue = ele.split("=");
			paramObj[keyvalue[0]] = keyvalue[1];
		})

		const appid = motorAppId;
		const secret = motorSecret;
		Motor.ServiceConfig.server = bimServer;
		Motor.Config.MOTOR_BASE_URL = motor_base_url;

		const projectId = bimProjectId;

		var selectedColor = Motor.Color.fromCssColorString('#03f3f7').withAlpha(0.5);
		// 动态加载数据
		function dynamicloadNodes(treeNode) {
			return Motor.Project.getChildNodesFromTree(treeNode);
		}

		// 重新设置数据
		function reSetNodes(zTreeObj) {
			let node = zTreeObj.getNodes();
			let nodes = zTreeObj.transformToArray(node);
			if (nodes.length > 0) {
				for (let i = 0; i < nodes.length; i++) {
					if (!nodes[i].children) {
						if (nodes[i].level === 3) {
							nodes[i].isParent = true;
						}
						nodes[i].nocheck = true;
						zTreeObj.updateNode(nodes[i]);
					}
				}
			}
		}

		//初始化Viewer
		var viewer = new Motor.Viewer({
			container: 'container', //viewer所在的div元素id
			viewerMode: Motor.ViewerMode.CIM, //viewer的模式
			appid: appid,
			secret: secret,
			antialias: true
		});
		viewer.initialize().then(function () {
			drawProject(projectId, true);
			//开启框选放大
			viewer.enableMarquee = true;
			//框选放大
			$('.selectd').on('click', function () {
				//开始一次框选放大
				viewer.marqueeEditor.startMarquee();
				$('body').css('cursor', 'crosshair');
				$('.selectd').css({
					'background': 'url("./static/images/ic_kuangxuanfangda_hover.png") no-repeat center',
					'pointerEvents': 'none'
				})
			})
			//鼠标结束框选
			viewer.marqueeEditor.marqueeStop.addEventListener(function () {
				$('body').css('cursor', 'default');
				$('.selectd').css({
					'background': 'url("./static/images/ic_kuangxuanfangda.png") no-repeat center',
					'pointerEvents': 'auto'
				})
			});

			//高亮构件并显示信息框
			function highlightComponent(component, multi = false) {
				//改变构件透明度
				if (multi) {
					selectedComponents.push(component);
					currentProject.selectComponents(selectedComponents);
				} else {
					component.select();
					selectedComponents = [component]
				}
				currentSelectedComponent = component;
			}
			//Motor.Color(0.1, 0.2, 0.4, 0.5);或者Motor.Color.fromBytes(255,255,255,125)

			//设置点选后的回调函数
			viewer.addMouseEventListener(Motor.MouseEventType.LEFT_CLICK, function (mouse) {
				var obj = viewer.pick(mouse.position, currentProject);
				if (obj instanceof Motor.Component) {
					var component = obj;
					highlightComponent(component);
				} else {
					currentProject.deselectAllComponents();
					selectedComponents = [];
					currentSelectedComponent = undefined;
				}
				$('#infoBox').hide();
				$('#contextContainer').hide();
			});

			viewer.addMouseEventListener(Motor.MouseEventType.LEFT_CLICK, function (mouse) {
				var obj = viewer.pick(mouse.position, currentProject);
				if (obj instanceof Motor.Component) {
					var component = obj;
					highlightComponent(component, true);
				} else {
					currentProject.deselectAllComponents();
					selectedComponents = [];
					currentSelectedComponent = undefined;
					$('#infoBox').hide();
				}
				$('#contextContainer').hide();
			}, Motor.KeyboardEventModifier.CTRL);
			//双击飞向构件
			viewer.addMouseEventListener(Motor.MouseEventType.LEFT_DOUBLE_CLICK, function (mouse) {
				var obj = viewer.pick(mouse.position, currentProject);
				if (obj instanceof Motor.Component) {
					//飞向构件
					viewer.flyTo(obj);
				}
			});
			document.addEventListener("keydown", function (e) {
				if (e.keyCode === 27) {
					if (selectedComponents.length > 0) {
						currentProject.deselectAllComponents();
						selectedComponents = [];
						currentSelectedComponent = undefined;
					}
					$('#infoBox').hide();
					$('#contextContainer').hide();
				}
			});
			var contextContainer = document.getElementById('contextContainer');
			var contextmenu = document.getElementById('contextmenu');
			var liCount = 0;
			var infoNames = {
				'major': '专业',
				'floor': '楼层',
				'main_type': '大类',
				'sub_type': '小类'
			}
			contextmenu.childNodes.forEach(function (child) {
				// console.log(child.tagName)
				if (child.tagName === "LI") {
					switch (liCount) {
						case 0:
							child.onclick = function () {
								console.log("构件详情");
								currentSelectedComponent.getProperties().then(data => {
									var props = data.props;
									var groups = {};
									props.forEach(function (prop) {
										if (prop.group) {
											let groupIndex = undefined;
											for (let key in groups) {
												if (key === prop.group) {
													groupIndex = key;
													break;
												}
											}
											if (groupIndex) {
												groups[groupIndex].push({
													name: prop.name,
													value: prop.value,
													unit: prop.unit
												})
											} else {
												groups[prop.group] = [{
													name: prop.name,
													value: prop.value,
													unit: prop.unit
												}]
											}
										} else {
											if (groups['属性']) {
												groups['属性'].push({
													name: prop.name,
													value: prop.value,
													unit: prop.unit
												})
											} else {
												groups['属性'] = [{
													name: prop.name,
													value: prop.value,
													unit: prop.unit
												}];
											}
										}
									})

									var tableStr = '';
									tableStr +=
										`<h3 style="color:white">${data.name?data.name:data.guid}</h3>`
									tableStr +=
										`<div style="display: flex;width: 100%;justify-content: space-between; blackgroud-color:black;">
                                                        <span style="color:#bdbcbc;width:200px;border:1px solid grey;padding: 2px 2px;">GUID</span>
                                                        <span style="width:200px;border:1px solid grey;padding: 2px 2px;">${data.guid}</span>
                                                    </div>`;
									for (var key in infoNames) {
										tableStr +=
											`<div style="display: flex;width: 100%;justify-content: space-between; blackgroud-color:black;">
                                                        <span style="color:#bdbcbc;width:200px;border:1px solid grey;padding: 2px 2px;">${infoNames[key]}</span>
                                                        <span style="width:200px;border:1px solid grey;padding: 2px 2px;">${data[key]}</span>
                                                    </div>`;
									}
									for (let group in groups) {
										let temp = '';
										groups[group].forEach(item => {
											temp +=
												`
                                                <div style="display: flex;width: 100%;justify-content: space-between; blackgroud-color:black;">
                                                    <span style="color:#bdbcbc;width:200px;border:1px solid grey;padding: 2px 2px;">${item.name}</span>
                                                    <span style="width:200px;border:1px solid grey;padding: 2px 2px;">${item.value?item.value:""} ${item.unit?item.unit:""}</span>
                                                </div>
                                            `;
										})
										tableStr +=
											`<div>
                                            <div style="background-color:grey;">${group}</div>
                                            ${temp}
                                        </div>`;
									}
									$('#infoBox').html(tableStr);
									$('#infoBox').show();
								});
								// contextContainer.setAttribute('style','display:none;');
								$('#contextContainer').hide();
							}
							break;
						case 1:
							child.onclick = function () {
								currentProject.reset();
								if (currentProject.drawEdge) {
									currentProject.drawEdge = false;
								}
								console.log("隐藏选中构件");
								hiddenComponents = hiddenComponents.concat(selectedComponents);
								currentProject.setComponentsVisiblity(false, hiddenComponents);
								$('#contextContainer').hide();
							}
							break;
						case 2:
							child.onclick = function () {
								currentProject.reset();
								if (currentProject.drawEdge) {
									currentProject.drawEdge = false;
								}
								console.log("半透明选中构件");
								transparentComponents = transparentComponents.concat(selectedComponents);
								currentProject.setComponentsColor(Motor.Color.WHITE.withAlpha(0.4),
									transparentComponents);
								$('#contextContainer').hide();
							}
							break;
						case 3:
							child.onclick = function () {
								currentProject.reset();
								if (currentProject.drawEdge) {
									currentProject.drawEdge = false;
								}
								console.log("隔离选中构件");
								isolatedComponents = isolatedComponents.concat(selectedComponents);
								currentProject.isolateComponents(isolatedComponents);
								// isolateComponent = currentSelectedComponent;
								$('#contextContainer').hide();
							}
							break;
						case 4:
							child.onclick = function () {
								console.log("还原构件样式");
								// if(currentProject.drawEdge){
								//     currentProject.drawEdge=false;
								// }
								if (selectedComponents.length > 0 || hiddenComponents.length > 0 ||
									transparentComponents.length > 0 ||
									isolatedComponents.length > 0) {
									hiddenComponents = [];
									transparentComponents = [];
									isolatedComponents = [];
									currentProject.reset();
									currentProject.selectComponents(selectedComponents);
								}
								$('#contextContainer').hide();
							}
							break;
						case 5:
							child.onclick = function () {
								console.log("资产详情");
								currentSelectedComponent.getProperties().then(data => {
									var props = data.props;
									var groups = {};
									props.forEach(function (prop) {
										if (prop.name == '资产编码' && prop.value !=
											undefined) {
											showZcDetail(prop.value);
											$('#contextContainer').hide();
										}
									});
								});
							}
							break;
						default:
							break;
					}
					liCount++;
				}
			})
			viewer.addMouseEventListener(Motor.MouseEventType.RIGHT_CLICK, function (mouse) {
				//根据屏幕坐标coords，获取点选的对象
				if (selectedComponents.length > 0) {
					let index = 0;
					contextmenu.childNodes.forEach(function (child) {
						if (child.tagName === "LI") {
							if (index < 4) {
								if (index === 0 && selectedComponents.length > 1) {
									child.setAttribute('class', 'li-disable');
								} else {
									child.setAttribute('class', 'li');
								}
								index++;
							}
						}
					})
				} else {
					let index = 0;
					contextmenu.childNodes.forEach(function (child) {
						if (child.tagName === "LI") {
							if (index < 4) {
								child.setAttribute('class', 'li-disable');
								index++;
							}
						}
					})
				}
				contextContainer.setAttribute('style', 'display:block;top:' + mouse.position.y + 'px;left:' +
					mouse.position.x +
					'px;')
			})




			//相机复位按钮
			$('.camera_reset').on('click', function () {
				viewer.flyTo(currentProject);
			})


			//CIM BIM切换
			$('.cim_bim').on('click', function () {
				//切换到CIM-BIM
				viewer.viewerMode = viewer.viewerMode == Motor.ViewerMode.CIM ? Motor.ViewerMode.BIM : Motor
					.ViewerMode.CIM;
				viewer.viewerMode == Motor.ViewerMode.BIM ? $('.cim_bim').css({
					'background': 'url("./static/images/ic_map.png") no-repeat center'
				}) : $('.cim_bim').css({
					'background': 'url("./static/images/ic_map_hover.png") no-repeat center'
				})
				if (viewer.viewerMode == Motor.ViewerMode.CIM) {
					if (clippingPlaneEditor && !clippingPlaneEditor.isDestroyed()) {
						$('.section_box_container').hide();
						clippingPlaneEditor.destroy();
					}
				}
			})


			//剖切
			var clippingPlaneEditor;
			$('.section').on('click', function () {
				if (clippingPlaneEditor && !clippingPlaneEditor.isDestroyed()) {
					$('.section').css('background', 'url("./static/images/ic_pouqie.png") no-repeat center')
					$('.section_box_container').hide();
					clippingPlaneEditor.destroy();
				} else if (viewer.viewerMode != Motor.ViewerMode.CIM && viewer.navigationMode != Motor
					.NavigationMode.NAV_FREE_KEY) {
					$('.section').css('background',
						'url("./static/images/ic_pouqie_hover.png") no-repeat center');
					$('.section_box_container').show();
					// $('.section_box_container>li').css({ 'backgroundColor': 'rgb(2, 20, 48)' });
					clippingPlaneEditor = new Motor.ClippingPlaneEditor(currentProject);
					planeVisibility = true;
					clippingPlaneEditor.addClippingPlane($('#section_box').val());
					$('#togglePlane').css({
						'background': 'url("./static/images/ic_display.png") no-repeat center'
					})
				} else {
					var str_1 = [];
					if (viewer.viewerMode == Motor.ViewerMode.CIM) {
						// str_1.push('请切换至BIM模式操作');
						viewer.viewerMode = Motor.ViewerMode.BIM;
					}
					if (viewer.navigationMode == Motor.NavigationMode.NAV_FREE_KEY) {
						$('.roam_box').hide();
						viewer.navigationMode = Motor.NavigationMode.NAV_FREE_MOUSE;
						// str_1.push('请关闭全景漫游');
					}
					$('.section').css('background',
						'url("./static/images/ic_pouqie_hover.png") no-repeat center');
					$('.section_box_container').show();
					// $('.section_box_container>li').css({ 'backgroundColor': 'rgb(2, 20, 48)' });
					clippingPlaneEditor = new Motor.ClippingPlaneEditor(currentProject);
					planeVisibility = true;
					clippingPlaneEditor.addClippingPlane($('#section_box').val());
					$('#togglePlane').css({
						'background': 'url("./static/images/ic_display.png") no-repeat center'
					})
					viewer.viewerMode == Motor.ViewerMode.BIM ? $('.cim_bim').css({
						'background': 'url("./static/images/ic_map.png") no-repeat center'
					}) : $('.cim_bim').css({
						'background': 'url("./static/images/ic_map_hover.png") no-repeat center'
					})
					// alert(str_1.join(','));
				}
			});
			$('#section_box').on('change', function () {
				// $(this).css({ 'backgroundColor': 'skyblue' }).siblings().css({ 'backgroundColor': 'rgb(2, 20, 48)' });
				// $('.section_box').css('display', 'none');
				clippingPlaneEditor.addClippingPlane($(this).val());
				$('#togglePlane').css({
					'background': 'url("./static/images/ic_display.png") no-repeat center'
				})
			})
			var planeVisibility = true;
			$('#togglePlane').on('click', function () {
				planeVisibility = !planeVisibility;
				clippingPlaneEditor.setPlaneVisibility(planeVisibility);
				// planeVisibility?$('#togglePlane').removeClass('select'):$('#togglePlane').addClass('select');
				if (planeVisibility) {
					$('#togglePlane').css({
						'background': 'url("./static/images/ic_display_hover.png") no-repeat center'
					})
				} else {
					$('#togglePlane').css({
						'background': 'url("./static/images/ic_hide_hover.png") no-repeat center'
					})
				}
			})
			$('#togglePlane').hover(function () {
				if (planeVisibility) {
					$('#togglePlane').css({
						'background': 'url("./static/images/ic_display_hover.png") no-repeat center'
					})
				} else {
					$('#togglePlane').css({
						'background': 'url("./static/images/ic_hide_hover.png") no-repeat center'
					})
				}
			}, function () {
				if (planeVisibility) {
					$('#togglePlane').css({
						'background': 'url("./static/images/ic_display.png") no-repeat center'
					})
				} else {
					$('#togglePlane').css({
						'background': 'url("./static/images/ic_hide(1).png") no-repeat center'
					})
				}
			})


			//漫游
			var autoRoamManger
			$('.roam').on('click', function () {
				if (autoRoamManger && !autoRoamManger.isDestroyed()) {
					autoRoamManger.destroy();
					$('.roam').css({
						'background': 'url("./static/images/ic_manyou.png") no-repeat center'
					});
					$('.roam_box').hide();
				} else {
					$('.roam').css({
						'background': 'url("./static/images/ic_manyou_hover.png") no-repeat center'
					});
					$('.roam_box').show();
					//初始化路径漫游管理器
					autoRoamManger = new Motor.AutoRoamManager(viewer); //传入Motor.Viewer对象
				}

			});
			$('.router_file').on('click', function () {
				//从文件中加载路径关键点
				autoRoamManger.createRouteFromFile('./static/data/routes.json');
				//从数组对象中读取路径关键点
				// autoRoamManger.createRouteFromArray(array);
			})
			//开启录制, 每隔一秒添加一次相机姿态
			var timer;

			$('.Record').on('click', function () {
				$('.Record>span').css('display', 'inline');
				clearInterval(timer);
				timer = setInterval(function () {
					autoRoamManger.addPose();
				}, 1000);
			})
			//关闭录制
			$('.closeRecord').on('click', function () {
				$('.Record>span').css('display', 'none');
				clearInterval(timer);
			})
			$('.addPose').on('click', function () {
				//将当前相机位置和姿态添加到路径中
				autoRoamManger.addPose();
			})
			$('.playRoam').on('click', function () {
				//播放路径
				autoRoamManger.playRoam();
			})
			$('.stopRoam').on('click', function () {
				//停止路径
				autoRoamManger.stopRoam();
			})
			$('.emptyRoutes').on('click', function () {
				//清空路径
				autoRoamManger.emptyRoutes();
			})
			$('.consoleRoam').on('click', function () {
				//获取路径点，输出的文本就可以直接保存成路径文件
				console.log(JSON.stringify(autoRoamManger.cameraPoses));
			})
			$('.first_person').on('click', function () {
				if (clippingPlaneEditor && !clippingPlaneEditor.isDestroyed()) {
					$('.section').css('background', 'url("./static/images/ic_pouqie.png") no-repeat center')
					clippingPlaneEditor.destroy();
				}
				//开启第一人称漫游
				viewer.navigationMode = Motor.NavigationMode.NAV_FREE_KEY;
			})
			$('.first_person_close').on('click', function () {
				//关闭第一人称漫游
				viewer.navigationMode = Motor.NavigationMode.NAV_FREE_MOUSE;
			})
			$('.speed').on('change', function () {
				//修改漫游速度
				viewer.roamEditor.movementSpeed = $('.speed').val();
			})
			$('.isGravitative').on('change', function () {
				//开启/关闭重力
				viewer.roamEditor.isGravitative = viewer.roamEditor.isGravitative == true ? false : true;
			})

			//切换地图服务
			$('.map_serve').on('click', function () {
				if ($('.map_serve_box').css('display') == 'none') {
					$('.map_serve').css({
						'background': 'url("./static/images/ic_map_serve_hover.png") no-repeat center'
					});
					$('.map_serve_box').css({
						'display': 'block'
					})
				} else {
					$('.map_serve').css({
						'background': 'url("./static/images/ic_map_serve.png") no-repeat center'
					});
					$('.map_serve_box').css({
						'display': 'none'
					})
				}

			})
			$('.map_serve_box').on('click', 'li', function () {
				$('.map_serve').css({
					'background': 'url("./static/images/ic_map_serve.png") no-repeat center'
				});
				$('.map_serve_box').css('display', 'none');
				if ($(this).attr('title') == '天地图') {
					//切换到天地图
					viewer.mapCollection.removeAll();
					viewer.mapCollection.add(new Motor.TiandituMap({
						token: '2b6bbb88d28124168e36297ab20c6fa0',
						maximumLevel: 17
					}));
				} else if ($(this).attr('title') == 'ArcGIS') {
					//切换到ArcGIS地图服务
					viewer.mapCollection.removeAll();
					viewer.mapCollection.add(new Motor.ArcGISMap({
						url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer'
					}));
				} else if ($(this).attr('title') == 'WMTS') {
					//切换到WMTS地图服务
					viewer.mapCollection.removeAll();
					viewer.mapCollection.add(new Motor.WebMapTileService({
						url: 'http://cim.citylinker.com:13381/geoserver/gwc/service/wmts',
						layer: 'bigdata:darkworld',
						style: '',
						tileMatrixSetID: 'EPSG:4326',
						tileMatrixLabels: ['EPSG:4326:0', 'EPSG:4326:1', 'EPSG:4326:2',
							'EPSG:4326:3', 'EPSG:4326:4',
							'EPSG:4326:5', 'EPSG:4326:6', 'EPSG:4326:7', 'EPSG:4326:8',
							'EPSG:4326:9', 'EPSG:4326:10',
							'EPSG:4326:11', 'EPSG:4326:12', 'EPSG:4326:13', 'EPSG:4326:14',
							'EPSG:4326:15'
						],
						// minimum: 0,
						maximumLevel: 15
					}));
				} else if ($(this).attr('title') == 'Bing') {
					viewer.mapCollection.removeAll();
					viewer.mapCollection.add(new Motor.BingMap({
						url: 'https://dev.virtualearth.net'
					}));
				}
			});

			//边线显隐
			$('.edge').on('click', function () {
				currentProject.drawEdge = !currentProject.drawEdge;
			})

			//开关抗锯齿
			$('.antialias').on('click', function () {
				viewer.taaEnabled = !viewer.taaEnabled;
				$('.antialias').css('background', 'url("./static/images/' + (viewer.taaEnabled ?
						'ic_kjc_hover' : 'ic_kjc') +
					'.png") no-repeat center')
			})
		})
		/**
		 * 绘制工程
		 */
		var currentProject;
		var optionTemplate = ["floor", "main_type", "sub_type", "name"];

		function drawProject(projectId, isInSubScene) {
			currentProject = viewer.queryProject(projectId);
			currentProject.open({
				drawEdge: isInSubScene
			}).then(function () {
				$('#loading').hide();
				debugger
				if (isInSubScene) {
					// currentProject.getTreeStructure().then(data=>{
					//     var pTree = data;
					//     if (pTree) {
					//         let zTreeObj;
					//         let setting = {
					//             data: {
					//                 key: {
					//                     checked: "isChecked"
					//                 }
					//             },
					//             view: {
					//                 fontCss: { color: "white" }
					//             },
					//             check: {
					//                 enable: true,       //设置是否显示checkbox复选框
					//             },
					//             callback: {
					//                 onCheck: function (e, id, treeNode) {
					//                     if(currentProject.drawEdge){
					//                         currentProject.drawEdge = false;
					//                     }
					//                     currentProject.setVisiblityFromTree(treeNode);
					//                     let treeObj = $.fn.zTree.getZTreeObj("treeDemo");
					//                     let nodes = treeObj.getCheckedNodes();
					//                     let designIds = [];
					//                     $.each(nodes, function (i, item) {
					//                         designIds.push(item.id);
					//                         item.checkedOld = item.checked;
					//                     })
					//                 },
					//                 onClick: function (e, id, treeNode) {
					//                     currentProject.setComponentsColorFromTree(treeNode,Motor.Color.CYAN);
					//                     $('#infobox').hide();
					//                 },
					//                 onDblClick: function (e, id, treeNode) {
					//                     if (!treeNode.children && treeNode.level === 4) {
					//                         let component = currentProject.getComponentFromTree(treeNode);
					//                         let innerHTML = '';
					//                         for (var key in component.infos) {
					//                             innerHTML += '<div title=' + component.infos[key] + '>' + key + ': ' + component.infos[key] + '</div>';
					//                         }
					//                         $('#infobox').html('<div title=' + component.guid + '>' + component.guid + '</div>' + innerHTML);
					//                         $('#infobox').show();
					//                         viewer.flyTo(component);
					//                     }
					//                     else {
					//                         $('#infobox').hide();
					//                     }
					//                 },
					//                 onExpand: function (event, treeId, treeNode) {
					//                     if (treeNode.level === 3 && (!treeNode.children||tree.children.length)) {
					//                         dynamicloadNodes(treeNode).then(function (data) {
					//                             treeNode.children = [];
					//                             zTreeObj.addNodes(treeNode, data)
					//                             reSetNodes(zTreeObj)
					//                         })
					//                     }
					//                 }
					//             },
					//         };
					//         zTreeObj = $.fn.zTree.init($("#treeDemo"), setting, pTree);
					//         zTreeObj.checkAllNodes(true);
					//         reSetNodes(zTreeObj);
					//         $('.tree_container').show();
					//     }
					// }).otherwise(function(err){
					//     console.log(err)
					// });

				}
			});

		}
	</script>
	<script>
		var baiduMap;

		function dateFormat(fmt, date) {
			let ret;
			const opt = {
				"Y+": date.getFullYear().toString(), // 年
				"m+": (date.getMonth() + 1).toString(), // 月
				"d+": date.getDate().toString(), // 日
				"H+": date.getHours().toString(), // 时
				"M+": date.getMinutes().toString(), // 分
				"S+": date.getSeconds().toString() // 秒
				// 有其他格式化字符需求可以继续添加，必须转化成字符串
			};
			for (let k in opt) {
				ret = new RegExp("(" + k + ")").exec(fmt);
				if (ret) {
					fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
				};
			};
			return fmt;
		}
		$(function () {
			$('#menu1').show();
			//资产详情点击事件  菜单点击
			$('.detailModel .model-menu a').click(function () {
				$(this).addClass("active").siblings("a").removeClass("active");
				let conId = $(this).attr('conid');
				$('#' + conId).show().siblings().hide();
				if (conId == 'menu5') {
					setTimeout(function () {
						baiduMap && baiduMap.centerAndZoom(new BMap.Point($('#' + conId).attr('blng'),
							$('#' + conId).attr('blat')), 15); // 初始化地图,设置中心点坐标和地图级别
					}, 10);
				}
			});
			$('.detailModel #gbclod').click(function () {
				$('.detailModel').hide();
				$('.layui-layer-shade').hide();
				$('.model-con .m-con').html('');
				$('.model-menu a[conid=menu1]').addClass("active").siblings("a").removeClass("active");
				$('#menu1').show().siblings().hide();
				baiduMap = null;
			});


			$('#gbclod2').click(function () {
				$('.m-xq-con').hide();
			});
			$('#gbclod3').click(function () {
				$('.m-sj-con').hide();
			});

			//图纸预览
			$('.detailModel').on('click', '.tz-yl', function () {
				let id = $(this).parent().find('.image-ylul').attr('id');
				window.imageYlObj[id].show();
			});
			//图纸下载
			$('.detailModel').on('click', '.tz-download', function () {

			});
			//随机资料下载
			$('.detailModel').on('click', '.sj-download', function () {
				let xzId = $(this).attr('xzid');
				let xzName = $(this).attr('downname');
				downloadImgByBase64(document.getElementById(xzId).src, xzName);
			});

			function downloadImgByBase64(url, name) {
				var img = new Image()
				img.onload = function () {
					var canvas = document.createElement('canvas')
					canvas.width = img.width
					canvas.height = img.height
					var ctx = canvas.getContext('2d')
					// 将img中的内容画到画布上
					ctx.drawImage(img, 0, 0, canvas.width, canvas.height)
					// 将画布内容转换为base64
					var base64 = canvas.toDataURL()
					// 创建a链接
					var a = document.createElement('a')
					a.href = base64
					a.download = name;
					// 触发a链接点击事件，浏览器开始下载文件
					a.click()
				}
				img.src = url
				// 必须设置，否则canvas中的内容无法转换为base64
				img.setAttribute('crossOrigin', 'Anonymous')
			}
			window.imageYlObj = {};
			//随机资料，图纸预览
			$('.detailModel').on('click', '.zc-btn', function () {
				let code = $(this).attr('data-code');
				let id = $(this).attr('data-id');
				if (id == 1) {
					$('.m-xq-con').show();
					$.get(baseUrl + 'dlssxx/main/drawinginfo/getdrawinglistbycode?code=' +
						code,
						function (res) {
							if (res && res.length > 0) {
								let trDom = '';
								$.each(res, function (index, item) {
									let imageDom = '';
									if (item.fFilePath && item.fFilePath.length > 0) {
										imageDom += '<ul class="image-ylul" id="imageYl' + index +
											'" style="display:none;">';
										let imageList = JSON.parse(item.fFilePath);
										$.each(imageList, function (index2, item2) {
											imageDom +=
												`<li><img data-original="${bimImageBaseUrl}${item2.storeFileName}" src="${bimImageBaseUrl}${item2.storeFileName}" alt="${item2.realFileName}"></li>`;
										});
										imageDom += '</ul>'
									}
									trDom += `<tr>
											<td>${item.fDrawingNo}</td>
											<td>${item.fDrawingName}</td>
											<td><div class="tz-yl">图纸预览</div>${imageDom}</td>
										</tr>`;
								});
								// <table class="table" style="margin-bottom: 0;margin-top:20px;">
								// 		<tbody><tr>
								// 			<th>图纸明细</th>
								// 			<td><div class="tz-download">图纸下载<div></td>
								// 		</tr>
								// </tbody></table>
								let dom = `<table class="table" style="margin-bottom: 0;">
									<tbody>
										<tr>
											<th>图册编码*</th>
											<td>${res[0].fAtlasCode}</td>
											<th>图册名称*</th>
											<td>${res[0].fAtlasName}</td>
										</tr>
									</tbody></table>
									<table class="table" style="margin-bottom: 0;margin-top:20px;">
									<tbody>
										<tr>
											<td>图纸编号</td>
											<td>图纸名称</td>
											<td>图纸预览</td>
										</tr>
										${trDom}
									</tbody></table>`;
								$('.m-xq-con .xq-con').html(dom);
								$('.image-ylul').each(function (index, item) {
									let id = $(item).attr('id');
									console.log(id);
									window.imageYlObj[id] = new Viewer(document.getElementById(
										id), {
										url: 'data-original',
										toolbar: false
									});
								});
							}
						});
				} else if (id == 2) {
					$('.m-sj-con').show();
					$.get(baseUrl + 'dlssxx/main/assubfile/getassubfilelistbycode?code=' +
						code,
						function (res) {
							if (res && res.length > 0) {
								let dom = '';
								$.each(res, function (index, item) {
									let imageList = JSON.parse(item.fFilePath);
									dom += `<table class="table" style="margin-bottom: 0;">
											<tr>
												<th>随机资料编码</th>
												<td>${item.fSubfileCode}</td>
												<th>随机资料</th>
												<td><div class="sj-download" xzid="sjImage${index}" downname="${imageList[0].realFileName}">点击下载</div><img style="display:none;" id="sjImage${index}" src="${bimImageBaseUrl}${imageList[0].storeFileName}"></td>
											</tr>
										</table>`;
								});
								$('.m-sj-con .sj-con').html(dom);

							}
							console.log(res);
						});
				}

			});


			function loadJScript() {
				var script = document.createElement("script");
				script.type = "text/javascript";
				script.src =
					"http://api.map.baidu.com/api?ak=jnYOEDxksKNsTupsg3VrUVHRTNSoQpfK&v=3.0&services=true&callback=baidudituInit";
				document.body.appendChild(script);
			}
			loadJScript();
			window.baidudituInit = function () {
				window.baidudituIsInit = true;
			}
		});

		function zCcreateTrTd(asInfoAttrList, sNum) {
			let mDom = '',
				imgDom = '',
				trmDom = ''; //动态参数, 图片Dom
			let dom2 =
				'<th style="visibility: hidden;"></th><td style="visibility: hidden;"></td><th style="visibility: hidden;"></th><td style="visibility: hidden;"></td>';
			let dom1 = '<th style="visibility: hidden;"></th><td style="visibility: hidden;"></td>';
			if (asInfoAttrList && asInfoAttrList.length >= 1) {
				let fgList = [];
				let sxList = [],
					stList = [];
				if (asInfoAttrList.length > 2 && sNum !== 0) {
					sxList = asInfoAttrList.slice(2, asInfoAttrList.length);
					stList = asInfoAttrList.slice(0, 2);
				} else {
					stList = asInfoAttrList;
				}
				for (let i = 0; i < sxList.length; i += 3) {
					fgList.push(sxList.slice(i, i + 3));
				}
				for (let i = 0; i < fgList.length; i++) {
					trmDom += '<tr>';
					for (let j = 0; j < fgList[i].length; j++) {
						trmDom += `<th>${fgList[i][j].fAttrCnName}</th><td>${fgList[i][j].fAttValue}</td>`;
					}
					if (fgList.length != 1 && fgList[i].length % 3 == 1) {
						trmDom += dom2;
					}
					if (fgList.length != 1 && fgList[i].length % 3 == 2) {
						trmDom += dom1;
					}
					if (fgList.length != 1) {
						trmDom += '</tr>';
					}
				}
				for (let i = 0; i < stList.length; i++) {
					mDom += `<th>${stList[i].fAttrCnName}</th><td>${stList[i].fAttValue}</td>`;
				}
				if (sNum == 2) {
					if (stList.length % 3 == 1) {
						mDom += dom1;
					}
				} else if (sNum == 1) {
					if (stList.length % 3 == 2) {
						mDom += dom2;
					}
				}
			} else {
				mDom = dom2;
			}
			return {
				mDom: mDom,
				trmDom: trmDom,
			}
		}


		function showZcDetail(idNo) {
			$('.detailModel').show();
			$('.layui-layer-shade').show();
			$('.model-con').css('height', ($('.detailModel').height() - 110) + 'px');
			$('.model-con .m-con').html('');
			$('.model-menu a[conid=menu1]').addClass("active").siblings("a").removeClass("active");
			$('#menu1').show().siblings().hide();
			//idNo 资产编码
			//zcType 资产类型  1,道路路段 2,桥梁 3,隧道 4,附属设施
			$.get(baseUrl + 'dlssxx/main/diseaseanalysis/getdatainfobymodecompentid?modeCompentID=' +
				idNo,
				function (res) {
					console.log(res);
					let dataObj = JSON.parse(res);
					let dataJson = dataObj.list[0];
					let zcType = '';
					if (dataObj.stype == 'roadSection' || dataObj.stpye == 'roadSection') { //道路路段 
						zcType = 1;
					}
					if (dataObj.stype == 'manhole') { //检查井
						zcType = 2;
					}
					if (dataObj.stype == 'tunnel') { //隧道
						zcType = 3;
					}
					if (dataObj.stype == 'roadAsset') { //附属设施
						zcType = 4;
					}
					if (dataObj.stype == 'bridge') { //桥梁
						zcType = 5;
					}
					console.log(dataJson);
					let log, lat;
					$('.model-menu a[conid=menu5]').show();
					let [dParme1, dParme2, dParme3, dParme4, dParme5] = [
						[],
						[],
						[],
						[],
						[]
					];
					let [tableDom1, tableDom2, tableDom3, tableDom4, tableDom5] = ['', '', '', '', ''];
					let [mDom1, trmDom1, mDom2, trmDom2, mDom3, trmDom3, mDom4, trmDom4, mDom5, trmDom5] = ['', '', '',
						'', '', '', '', '', '', '', '', ''
					];
					$.each(dataJson.asInfoAttrList, function (index, item) {
						if (item.fAttType === '基本信息') {
							dParme1.push(item);
						} else if (item.fAttType === '参数信息') {
							dParme2.push(item);
						} else if (item.fAttType === '管理信息') {
							dParme3.push(item);
						} else if (item.fAttType === '价值信息') {
							dParme4.push(item);
						} else if (item.fAttType === '位置信息') {
							dParme5.push(item);
						}
					});
					if (dParme2.length > 0) {
						$.each(dParme2, function (index, item) {
							trmDom2 += `<tr><td>${item.fAttrCnName}</td><td>${item.fAttValue}</td></tr>`;
						});
					}
					if (dParme3.length > 0) {
						let aDom = zCcreateTrTd(dParme3, 1);
						mDom3 = aDom.mDom;
						trmDom3 = aDom.trmDom;
					}
					if (dParme4.length > 0) {
						let aDom = zCcreateTrTd(dParme4, 0);
						trmDom4 = aDom.trmDom;
					}
					if (dParme5.length > 0) {
						let aDom = zCcreateTrTd(dParme5, 1);
						mDom5 = aDom.mDom;
						trmDom5 = aDom.trmDom;
					}
					if (zcType == 1) {
						if (dParme1.length > 0) {
							let aDom = zCcreateTrTd(dParme1, 1);
							mDom1 = aDom.mDom;
							trmDom1 = aDom.trmDom;
						}
						$('.model-menu a[conid=menu5]').hide();
						tableDom1 =
							`<table class="table" style="margin-bottom: 0;"> 
							<tr>
								<th>道路路段代码</th><td> ${dataJson.fRoadSectionCode || '--'}</td>
								<th>道路路段名称</th><td> ${dataJson.fFinName || '--'} </td>
								<th>道路信息</th><td> ${dataJson.fRoadSectionName || '--'}</td>
							</tr> 
							<tr>
								<th>起点名称</th><td>  ${dataJson.fRoadSectionStart || '--'} </td>
								<th>终点名称</th><td>  ${dataJson.fRoadSectionEnd || '--'} </td>
								<th>起点桩号</th><td>  ${dataJson.fPileNumberStart}</td>
							</tr> 
							<tr>
								<th>终点桩号</th><td> ${dataJson.fPileNumberEnd || '--'}  </td>
								<th>路长</th><td> ${dataJson.fSectionLenth || '--'}  </td>
								<th>路宽</th><td> ${dataJson.fSectionWide || '--'}  </td>
							</tr> 
							<tr>
								<th>路面积</th><td> ${dataJson.fSectionArea || '--'}</td>
								<th>道路等级</th><td>  ${dataJson.fRoadGradeName || '--'}</td>
								<th>养护等级</th><td> ${dataJson.fCongradeName || '--'}</td>
							</tr> 
							<tr>
								<th>所属区域</th><td> ${dataJson.fLocationID || '--'}</td>
								<th>技术等级</th><td>  ${dataJson.fTechnicalGradeName || '--'}</td>
								<th>路面等级</th><td> ${dataJson.fPavementGradeName || '--'}</td>
							</tr>
							<tr>
								<th>路面类型</th><td> ${ dataJson.fPavementGradeName || '--'}</td>
								<th>面层类型</th><td> ${ dataJson.fSurfaceTypeName || '--'}</td>
								<th>模型构件ID</th><td>  ${ dataJson.modeCompentID || '--'}</td>
							</tr> 
							<tr>
								<th>计量单位</th><td> ${dataJson.fUnit || '--'}</td>
								<th>状态</th><td>  ${dataJson.fStatus || '--'}</td>
								<th>采购日期</th><td> ${ dataJson.fPurchaseDate && dateFormat('YYYY-mm-dd',new Date(dataJson.fPurchaseDate))}</td>
							</tr>
							<tr>
								<th>建造安装日期</th><td> ${ dataJson.fInstallDate && dateFormat('YYYY-mm-dd',new Date(dataJson.fInstallDate))}</td>
								<th>启用时期</th><td>  ${ dataJson.fStartDate && dateFormat('YYYY-mm-dd',new Date(dataJson.fStartDate))}</td>
								${mDom1}
							</tr> 
							${trmDom1} 
						</table>`;
						tableDom2 =
							`<table class="table" style="margin-bottom: 0;">
								<thead>
									<tr>
										<th style="text-align:left;">属性中文名称</th>
										<th style="text-align:left;">属性值</th>
									</tr>
								</thead>
								<tbody>
									${trmDom2}
								</tbody>
							</<table>`;
						tableDom3 =
							`<table class="table" style="margin-bottom: 0;">
								<tr>
								<th>养护单位</th><td> ${dataJson.fMaintainofficeName || '--'}</td>
								<th>巡查单位</th><td> ${dataJson.fPatrolofficeName || '--'} </td>
								${mDom3}
								</tr> 
								${trmDom3} 
							</<table>`;
						tableDom4 =
							`<table class="table" style="margin-bottom: 0;">
								<tr>
									<th>财务卡片编码</th><td> ${dataJson.fFinCode || '--'}</td>
									<th>财务资产名称</th><td> ${dataJson.fFinName || '--'} </td>
									<th>资产原值</th><td> ${dataJson.fValue || '--'} </td>
								</tr> 
								<tr>
									<th>竣工交付资产价值</th><td> ${dataJson.fDeliveryValue || '--'}</td>
									<th>累计折旧</th><td> ${dataJson.fUndertakeDep || '--'} </td>
									<th>已记提月份 ti</th><td> ${dataJson.fCountingMonth || '--'} </td>
								</tr>
								<tr>
									<th>减值准备</th><td> ${dataJson.fDepreciation || '--'}</td>
									<th>净值</th><td> ${dataJson.fNetValue || '--'} </td>
									<th>净残值 ti</th><td> ${dataJson.fNetSalvageValue || '--'} </td>
								</tr> 
								${trmDom4}
							</<table>`;
					}
					if (zcType == 2) {
						if (dParme1.length > 0) {
							let aDom = zCcreateTrTd(dParme1, 1);
							mDom1 = aDom.mDom;
							trmDom1 = aDom.trmDom;
						}
						let imgTr1 = '',
							imgTr2 = '';
						if (dataJson.PicID1 || dataJson.PicID2) {
							let pic1 = '';
							let pic2 = '';
							if (dataJson.PicID1) {
								pic1 =
									`<img style="width:150px;" src="${bimJcjgImagebaseUrl+dataJson.PicID1}"/>`;
							}
							if (dataJson.PicID2) {
								pic2 =
									`<img style="width:150px;" src="${bimJcjgImagebaseUrl+dataJson.PicID2}"/>`;
							}
							imgTr2 = `<th>远景照片</th><td>${pic1}${pic2}</td>`;
						}
						if (dataJson.PicID) {
							imgTr1 = `<tr>
										<th>近景照片</th>
										<td><img style="width:150px;" src="${bimJcjgImagebaseUrl+dataJson.PicID}" /></td>
										${imgTr2}
									</tr>`;

						} else {
							if (imgTr2) {
								imgTr1 = `<tr>
											${imgTr2}
										</tr>`
							}
						}
						tableDom1 =
							`<table class="table" style="margin-bottom: 0;"> 
							<tr>
								<th>类型</th><td> ${dataJson.manholetype || '--'}</td>
								<th>编码</th><td> ${dataJson.manholecode || '--'} </td>
								<th>路段信息</th><td> ${dataJson.RoadSectionName || '--'}</td>
							</tr> 
							<tr>
								<th>道路形式</th><td>  ${dataJson.pathform || '--'} </td>
								<th>方向</th><td>  ${dataJson.roaddirectionid || '--'} </td>
								<th>所在位置</th><td>  ${dataJson.PositionName || '--'}</td>
							</tr> 
							<tr>
								<th>采集时间</th><td> ${dataJson.coltime || '--'}</td>
								<th>采集人</th><td> ${dataJson.ColPersonName || '--'}  </td>
								<th>规格</th><td> ${dataJson.shapesize || '--'}  </td>
							</tr>
							<tr>
								<th>形状</th><td> ${dataJson.shapeid || '--'}  </td>
								<th>材质</th><td> ${dataJson.materialid || '--'}  </td>
								<th>现状</th><td>  ${dataJson.currentsituation || '--'}</td>
							</tr> 
							<tr>
								<th>采购日期</th><td> ${ (dataJson.fpurchasedate && dateFormat('YYYY-mm-dd',new Date(dataJson.fpurchasedate))) || '--'}</td>
								<th>建造安装日期</th><td> ${ (dataJson.finstalldate && dateFormat('YYYY-mm-dd',new Date(dataJson.finstalldate))) || '--'}</td>
								<th>启用时期</th><td>  ${ (dataJson.fstartdate && dateFormat('YYYY-mm-dd',new Date(dataJson.fstartdate))) || '--'}</td>
							</tr> 
							<tr>
								<th>图纸</th><td><div class="zc-btn" data-id="1" data-code="${dataJson.fdrawing}">点击图案预览</div></td>
								<th>随机资料</th><td><div class="zc-btn" data-id="2" data-code="${dataJson.ffile}">点击弹出预览</div></td>
								${mDom2}
							</tr>
							${trmDom2}
							${imgTr1}
						</table>`;
						tableDom2 =
							`<table class="table" style="margin-bottom: 0;">
								<thead>
									<tr>
										<th style="text-align:left;">属性中文名称</th>
										<th style="text-align:left;">属性值</th>
									</tr>
								</thead>
								<tbody>
									${trmDom2}
								</tbody>
							</<table>`;
						tableDom3 =
							`<table class="table" style="margin-bottom: 0;">
								<tr>
								<th>权属单位</th><td> ${dataJson.OwnershipOfficeName || '--'}</td>
								<th>养护单位</th><td> ${dataJson.MainTainOfficeName || '--'} </td>
								${mDom3}
								</tr> 
								${trmDom3} 
							</<table>`;
						tableDom4 =
							`<table class="table" style="margin-bottom: 0;">
								<tr>
									<th>财务卡片编码</th><td> ${dataJson.ffinCode || '--'}</td>
									<th>财务资产名称</th><td> ${dataJson.ffinName || '--'} </td>
									<th>资产原值</th><td> ${dataJson.ffalue || '--'} </td>
								</tr> 
								<tr>
									<th>竣工交付资产价值</th><td> ${dataJson.fdeliveryvalue || '--'}</td>
									<th>累计折旧</th><td> ${dataJson.fundertakedep || '--'} </td>
									<th>已计提月份</th><td> ${dataJson.fcountingmonth || '--'} </td>
								</tr>
								<tr>
									<th>减值准备</th><td> ${dataJson.fdepreciation || '--'}</td>
									<th>净值</th><td> ${dataJson.fnetvalue || '--'} </td>
									<th>净残值</th><td> ${dataJson.fnetsalvagevalue || '--'} </td>
								</tr> 
								${trmDom4}
							</<table>`;
						tableDom5 =
							`<table class="table" style="margin-bottom: 0;">
								<tr>
									<th>百度经度</th><td> ${dataJson.bdlon || '--'}</td>
									<th>百度纬度</th><td> ${dataJson.bdlat || '--'} </td>
									<th>经度</th><td> ${dataJson.lon || '--'} </td>
								</tr> 
								<tr>
									<th>纬度</th><td> ${dataJson.lat || '--'}</td>
									<th>位置</th><td> ${dataJson.manholepos || '--'} </td>
									${mDom5}
								</tr>
								${trmDom5}
							</<table>`;
						log = dataJson.bdlon;
						lat = dataJson.bdlat;
					}
					if (zcType == 3) {
						if (dParme1.length > 0) {
							let aDom = zCcreateTrTd(dParme1, 0);
							mDom1 = aDom.mDom;
							trmDom1 = aDom.trmDom;
						}
						tableDom1 =
							`<table class="table" style="margin-bottom: 0;"> 
							<tr>
								<th>隧道编码</th><td> ${dataJson.fTunnelCode || '--'}</td>
								<th>隧道名称</th><td> ${dataJson.fBridgeName || '--'} </td>
								<th>所属区域</th><td> ${dataJson.fLocation || '--'}</td>
							</tr> 
							<tr>
								<th>路段名称</th><td>  ${dataJson.fRoadSectionName || '--'} </td>
								<th>计量单位</th><td>  ${dataJson.fUnit || '--'} </td>
								<th>状态</th><td>  ${dataJson.fStatus || '--'}</td>
							</tr> 
							<tr>
								<th>入口桩号</th><td> ${dataJson.fPileNumberEnter || '--'}  </td>
								<th>隧道长度</th><td> ${dataJson.fTunnelLenth || '--'}  </td>
								<th>安全通道数量</th><td> ${dataJson.fSecureChannelNumber || '--'}  </td>
							</tr> 
							<tr>
								<th>隧道净宽</th><td> ${dataJson.fTunnelWide || '--'}</td>
								<th>是否水下隧</th><td>  ${dataJson.fIsUnderWator || '--'}</td>
								<th>修建年度</th><td> ${dataJson.fBuildingYears || '--'}</td>
							</tr> 
							<tr>
								<th>建设单位</th><td> ${dataJson.fBuildCompany || '--'}</td>
								<th>设计单位</th><td>  ${dataJson.fDesignCompany || '--'}</td>
								<th>施工单位</th><td> ${dataJson.fConstructionCompany || '--'}</td>
							</tr>
							<tr>
								<th>监理单位</th><td> ${ dataJson.fSupervisorCompany || '--'}</td>
								<th>建成通车日</th><td> ${ (dataJson.fOpenTrafficDay && dateFormat('YYYY-mm-dd',new Date(dataJson.fOpenTrafficDay))) || '--'}</td>
								<th>监管单位</th><td>  ${ dataJson.fSupervisionOfficeName || '--'}</td>
							</tr> 
							<tr>
								<th>隧道分类</th><td>${dataJson.fTunnelClassName || '--'}</td>
								<th>隧道净高</th><td> ${dataJson.fTunnelHight || '--'}</td>
								<th>人行道宽</th><td>  ${dataJson.fFOOTWaikWide || '--'}</td>
							</tr>
							<tr>
								<th>洞口形式</th><td> ${dataJson.fPotalFormName || '--'}</td>
								<th>断面形式</th><td>  ${dataJson.fSectionFormName || '--'}</td>
								<th>砌衬材料</th><td> ${dataJson.fLiningMaterialName || '--'}</td>
							</tr>
							<tr>
								<th>路面面层类型</th><td> ${dataJson.fPavementSurfaceTypeName || '--'}</td>
								<th>隧道排水类型</th><td>  ${ dataJson.fDrainageTypeName ||  '--'}</td>
								<th>隧道电子设备</th><td> ${ dataJson.fElectroniceEquipmentTypeName || '--'}</td>
							</tr>
							<tr>
								<th>隧道照明</th><td> ${dataJson.fLightingTypeName || '--'}</td>
								<th>隧道通风</th><td>  ${dataJson.fVentilateTypeName || '--'}</td>
								<th>消防设施</th><td> ${ dataJson.fFireFacilitiesTypeName || '--'}</td>
							</tr>
							<tr>
								<th>采购日期</th><td> ${ dataJson.fPurchaseDate && dateFormat('YYYY-mm-dd',new Date(dataJson.fPurchaseDate))}</td>
								<th>建造安装日期</th><td> ${ dataJson.fInstallDate && dateFormat('YYYY-mm-dd',new Date(dataJson.fInstallDate))}</td>
								<th>启用时期</th><td>  ${ dataJson.fStartDate && dateFormat('YYYY-mm-dd',new Date(dataJson.fStartDate))}</td>
							</tr>
							<tr>
								<th>模型资产编码</th><td>${dataJson.modeCompentID || '--'}</td>
								<th>图纸</th><td><div class="zc-btn" data-id="1" data-code="${dataJson.fDrawing}">点击图案预览</div></td>
								<th>随机资料</th><td><div class="zc-btn" data-id="2" data-code="${dataJson.fFile}">点击弹出预览</div></td>
							</tr> 
							${trmDom1} 
						</table>`;
						tableDom2 =
							`<table class="table" style="margin-bottom: 0;">
								<thead>
									<tr>
										<th style="text-align:left;">属性中文名称</th>
										<th style="text-align:left;">属性值</th>
									</tr>
								</thead>
								<tbody>
									${trmDom2}
								</tbody>
							</<table>`;
						tableDom3 =
							`<table class="table" style="margin-bottom: 0;">
								<tr>
								<th>养护单位</th><td> ${dataJson.fMaintainofficeName || '--'}</td>
								<th>巡查单位</th><td> ${dataJson.fPatrolofficeName || '--'} </td>
								${mDom3}
								</tr> 
								${trmDom3} 
							</<table>`;
						tableDom4 =
							`<table class="table" style="margin-bottom: 0;">
								<tr>
									<th>财务卡片编码</th><td> ${dataJson.fFinCode || '--'}</td>
									<th>财务资产名称</th><td> ${dataJson.fFinName || '--'} </td>
									<th>资产原值</th><td> ${dataJson.fValue || '--'} </td>
								</tr> 
								<tr>
									<th>竣工交付资产价值</th><td> ${dataJson.fDeliveryValue || '--'}</td>
									<th>累计折旧</th><td> ${dataJson.fUndertakeDep || '--'} </td>
									<th>已计提月份</th><td> ${dataJson.fCountingMonth || '--'} </td>
								</tr>
								<tr>
									<th>减值准备</th><td> ${dataJson.fDepreciation || '--'}</td>
									<th>净值</th><td> ${dataJson.fNetValue || '--'} </td>
									<th>净残值</th><td> ${dataJson.fNetSalvageValue || '--'} </td>
								</tr> 
								${trmDom4}
							</<table>`;
						tableDom5 =
							`<table class="table" style="margin-bottom: 0;">
								<tr>
									<th>百度经度</th><td> ${dataJson.fBDLon || '--'}</td>
									<th>百度纬度</th><td> ${dataJson.fBDLat || '--'} </td>
									<th>经度</th><td> ${dataJson.fLon || '--'} </td>
								</tr> 
								<tr>
									<th>纬度</th><td> ${dataJson.fLat || '--'}</td>
									<th>位置</th><td> ${dataJson.fLocation || '--'} </td>
									${mDom5}
								</tr>
								${trmDom5}
							</<table>`;
						log = dataJson.fBDLon;
						lat = dataJson.fBDLat;
					}
					if (zcType == 4) {
						if (dParme1.length > 0) {
							let aDom = zCcreateTrTd(dParme1, 2);
							mDom1 = aDom.mDom;
							trmDom1 = aDom.trmDom;
						}
						let imgTr1 = '',
							imgTr2 = '';
						if (dataJson.picID1 || dataJson.picID2) {
							let pic1 = '';
							let pic2 = '';
							if (dataJson.picID1) {
								pic1 =
									`<img style="width:150px;" src="${baseUrl + 'roadaccessoryasset/oss/'+dataJson.picID1}"/>`;
							}
							if (dataJson.picID2) {
								pic2 =
									`<img style="width:150px;" src="${baseUrl + 'roadaccessoryasset/oss/'+dataJson.picID2}"/>`;
							}
							imgTr2 = `<th>远景照片</th><td>${pic1}${pic2}</td>`;
						}
						if (dataJson.picID) {
							imgTr1 = `<tr>
										<th>近景照片</th>
										<td><img style="width:150px;" src="${baseUrl + 'roadaccessoryasset/oss/'+dataJson.picID}" /></td>
										${imgTr2}
									</tr>`;

						} else {
							if (imgTr2) {
								imgTr1 = `<tr>
											${imgTr2}
										</tr>`
							}
						}
						tableDom1 =
							`<table class="table" style="margin-bottom: 0;"> 
							<tr>
								<th>设施类型</th><td> ${dataJson.AssetName || '--'}</td>
								<th>设施编码</th><td> ${dataJson.assetCode || '--'} </td>
								<th>道路信息</th><td> ${dataJson.RoadName || '--'}</td>
							</tr> 
							<tr>
								<th>道路路段</th><td>  ${dataJson.RoadName || '--'} </td>
								<th>方向</th><td>  ${dataJson.RoadDirectionName || '--'} </td>
								<th>所在位置</th><td>  ${dataJson.PositionName || '--'}</td>
							</tr> 
							<tr>
								<th>规格</th><td> ${dataJson.shapeSize || '--'}  </td>
								<th>形状</th><td> ${dataJson.shapeID || '--'}  </td>
								<th>材质</th><td> ${dataJson.materialID || '--'}  </td>
							</tr> 
							<tr>
								<th>备注</th><td> ${dataJson.remark || '--'}</td>
								<th>现状</th><td>  ${dataJson.currentSituation || '--'}</td>
								<th>破损详情</th><td> ${dataJson.pSXQ || '--'}</td>
							</tr> 
							<tr>
								<th>模型资产编码</th><td> ${dataJson.modeCompentID || '--'}</td>
								<th>状态</th><td>  ${dataJson.fStatus || '--'}</td>
								<th>计量单位</th><td> ${dataJson.fUnit || '--'}</td>
							</tr>
							<tr>
								<th>采购日期</th><td> ${ dataJson.fPurchaseDate && dateFormat('YYYY-mm-dd',new Date(dataJson.fPurchaseDate))}</td>
								<th>建造安装日期</th><td> ${ dataJson.fInstallDate && dateFormat('YYYY-mm-dd',new Date(dataJson.fInstallDate))}</td>
								<th>启用时期</th><td>  ${ dataJson.fStartDate && dateFormat('YYYY-mm-dd',new Date(dataJson.fStartDate))}</td>
							</tr> 
							<tr>
								<th>采集时间</th><td> ${dataJson.colTime ? dateFormat('YYYY-mm-dd',new Date(dataJson.colTime)) :'--'}</td>
								<th>采集人</th><td>  ${dataJson.colPersonID || '--'}</td>
								<th>图纸</th><td><div class="zc-btn" data-id="1" data-code="${dataJson.fDrawing}">点击图案预览</div></td>
							</tr>
							<tr>
								<th>随机资料</th><td><div class="zc-btn" data-id="2" data-code="${dataJson.fFile}">点击弹出预览</div></td>
								${mDom1}
							</tr> 
							${trmDom1} 
							${imgTr1}
						</table>`;
						tableDom2 =
							`<table class="table" style="margin-bottom: 0;">
								<thead>
									<tr>
										<th style="text-align:left;">属性中文名称</th>
										<th style="text-align:left;">属性值</th>
									</tr>
								</thead>
								<tbody>
									${trmDom2}
								</tbody>
							</<table>`;
						tableDom3 =
							`<table class="table" style="margin-bottom: 0;">
								<tr>
								<th>权属单位</th><td> ${dataJson.OwnershipOfficeName || '--'}</td>
								<th>养护单位</th><td> ${dataJson.MainTainOfficeID || '--'} </td>
								${mDom3}
								</tr> 
								${trmDom3} 
							</<table>`;
						tableDom4 =
							`<table class="table" style="margin-bottom: 0;">
								<tr>
									<th>财务卡片编码</th><td> ${dataJson.fFinCode || '--'}</td>
									<th>财务资产名称</th><td> ${dataJson.fFinName || '--'} </td>
									<th>资产原值</th><td> ${dataJson.fValue || '--'} </td>
								</tr> 
								<tr>
									<th>竣工交付资产价值</th><td> ${dataJson.fDeliveryValue || '--'}</td>
									<th>累计折旧</th><td> ${dataJson.fUndertakeDep || '--'} </td>
									<th>已计提月份</th><td> ${dataJson.fCountingMonth || '--'} </td>
								</tr>
								<tr>
									<th>减值准备</th><td> ${dataJson.fDepreciation || '--'}</td>
									<th>净值</th><td> ${dataJson.fNetValue || '--'} </td>
									<th>净残值</th><td> ${dataJson.fNetSalvageValue || '--'} </td>
								</tr> 
								${trmDom4}
							</<table>`;
						tableDom5 =
							`<table class="table" style="margin-bottom: 0;">
								<tr>
									<th>百度经度</th><td> ${dataJson.bDLON || '--'}</td>
									<th>百度纬度</th><td> ${dataJson.bDLAT || '--'} </td>
									<th>经度</th><td> ${dataJson.lON || '--'} </td>
								</tr> 
								<tr>
									<th>纬度</th><td> ${dataJson.lAT || '--'}</td>
									<th>位置</th><td> ${dataJson.assetPos || '--'} </td>
									${mDom5}
								</tr>
								${trmDom5}
							</<table>`;
						log = dataJson.bDLON;
						lat = dataJson.bDLAT;
					}
					if (zcType == 5) {
						if (dParme1.length > 0) {
							let aDom = zCcreateTrTd(dParme1, 0);
							mDom1 = aDom.mDom;
							trmDom1 = aDom.trmDom;
						}
						tableDom1 =
							`<table class="table" style="margin-bottom: 0;"> 
							<tr>
								<th>道路路段</th><td> ${dataJson.fRoadSectionName || '--'}</td>
								<th>桥梁编码</th><td> ${dataJson.fBridgeCode || '--'} </td>
								<th>桥梁名称</th><td> ${dataJson.fBridgeName || '--'}</td>
							</tr> 
							<tr>
								<th>所属区域</th><td>  ${dataJson.fLocation || '--'} </td>
								<th>桥梁类型</th><td>  ${dataJson.fBridgeTypeName || '--'} </td>
								<th>中心桩号</th><td>  ${dataJson.fPileNumberCenter || '--'}</td>
							</tr> 
							<tr>
								<th>桥梁全长</th><td> ${dataJson.fBridgeLenth || '--'}  </td>
								<th>路径总长</th><td> ${dataJson.fSpanLenth || '--'}  </td>
								<th>单孔最大跨</th><td> ${dataJson.fSingleHoldMast || '--'}  </td>
							</tr> 
							<tr>
								<th>路径组合</th><td> ${dataJson.fSpanCom || '--'}</td>
								<th>桥梁全宽</th><td>  ${dataJson.fBridgeWide || '--'}</td>
								<th>桥面净宽</th><td> ${dataJson.fBridgeClearWide || '--'}</td>
							</tr> 
							<tr>
								<th>路径分类</th><td> ${dataJson.fSpanClassID || '--'}</td>
								<th>使用年限</th><td>  ${dataJson.fUseYears || '--'}</td>
								<th>主桥结构</th><td> ${dataJson.fBridgeStructureName || '--'}</td>
							</tr>
							<tr>
								<th>主桥材料</th><td> ${ dataJson.fBridgeMatierialName || '--'}</td>
								<th>桥墩类型</th><td> ${ dataJson.fPieTypeName || '--'}</td>
								<th>设计荷载</th><td>  ${ dataJson.fBridgeLoadName || '--'}</td>
							</tr> 
							<tr>
								<th>抗震等级</th><td>${dataJson.fAntiseismicGrideName || '--'}</td>
								<th>跨越地物</th><td> ${dataJson.fCrossingGroundName || '--'}</td>
								<th>通航等级</th><td>  ${dataJson.fOpenNavigationGradeName || '--'}</td>
							</tr>
							<tr>
								<th>墩台防撞</th><td> ${dataJson.fCollisionAvoidanceName || '--'}</td>
								<th>是否互通立交</th><td>  ${dataJson.fIsInterwork == '1' ? '是':'否'}</td>
								<th>建设单位</th><td> ${dataJson.fBuildCompany || '--'}</td>
							</tr>
							<tr>
								<th>修建年度</th><td> ${dataJson.fBuildingYears || '--'}</td>
								<th>竣工日期</th><td>  ${ (dataJson.fFinishDate && dateFormat('YYYY-mm-dd',new Date(dataJson.fFinishDate))) || '--'}</td>
								<th>建成通车日</th><td> ${ (dataJson.fOpenTrafficDay && dateFormat('YYYY-mm-dd',new Date(dataJson.fOpenTrafficDay))) || '--'}</td>
							</tr>
							<tr>
								<th>监管单位</th><td> ${dataJson.fSupervisorCompany || '--'}</td>
								<th>技术评定</th><td>  ${dataJson.fTechAssessmentName || '--'}</td>
								<th>技术评定日</th><td> ${ (dataJson.fTechAssessmentDate && dateFormat('YYYY-mm-dd',new Date(dataJson.fTechAssessmentDate))) || '--'}</td>
							</tr>
							<tr>
								<th>工程性质</th><td> ${dataJson.fEngineeringProperties || '--'}</td>
								<th>是否补助</th><td>  ${dataJson.fIsSubsidy == '1' ? '是':'否'} </td>
								<th>交通管制措施</th><td> ${dataJson.fTrafficControlMeasures || '--'}</td>
							</tr>
							<tr>
								<th>年限类型</th><td> ${dataJson.fFixedNumberYearsName || '--'}</td>
								<th>主桥孔数</th><td>  ${dataJson.fHoldNumber || '--'}</td>
								<th>主桥边跨</th><td> ${dataJson.fSideSpanNumber || '--'}</td>
							</tr>
							<tr>
								<th>前引桥长</th><td> ${dataJson.fFrontApproachLenth || '--'}</td>
								<th>后引桥长</th><td>  ${dataJson.fRearApproachLenth || '--'}</td>
								<th>桥下净空</th><td> ${dataJson.fClearanceUnder || '--'}</td>
							</tr>
							<tr>
								<th>桥台类型</th><td> ${dataJson.fBridgeAbutmentName || '--'}</td>
								<th>桥面铺装</th><td>  ${dataJson.fDeckPavementName || '--'}</td>
								<th>伸缩缝类型</th><td> ${dataJson.fExpantionJointName || '--'}</td>
							</tr>
							<tr>
								<th>支座类型</th><td> ${dataJson.fSupportTypeName || '--'}</td>
								<th>弯坡斜特征</th><td>  ${dataJson.fCurveSlopePropertiesName || '--'}</td>
								<th>总造价</th><td> ${dataJson.fCosts || '--'}</td>
							</tr>
							<tr>
								<th>是否危桥</th><td> ${dataJson.fIsDangerouse == '1' ? '是':'否'}</td>
								<th>备注</th><td>  ${dataJson.fRemark || '--'}</td>
								<th>模型资产编码</th><td> ${dataJson.modeCompentID || '--'}</td>
							</tr>
							<tr>
								<th>资产分类</th><td> ${dataJson.fAsType || '--'}</td>
								<th>计量单位</th><td>  ${dataJson.fUnit || '--'}</td>
								<th>状态</th><td> ${dataJson.fStatus || '--'}</td>
							</tr>
							<tr>
								<th>采购日期</th><td> ${ dataJson.fPurchaseDate && dateFormat('YYYY-mm-dd',new Date(dataJson.fPurchaseDate))}</td>
								<th>建造安装日期</th><td> ${ dataJson.fInstallDate && dateFormat('YYYY-mm-dd',new Date(dataJson.fInstallDate))}</td>
								<th>启用时期</th><td>  ${ dataJson.fStartDate && dateFormat('YYYY-mm-dd',new Date(dataJson.fStartDate))}</td>
							</tr>
							<tr>
								<th>资产专业</th><td>${dataJson.fAsSpeciality || '--'}</td>
								<th>图纸</th><td><div class="zc-btn" data-id="1" data-code="${dataJson.fDrawing}">点击图案预览</div></td>
								<th>随机资料</th><td><div class="zc-btn" data-id="2" data-code="${dataJson.fFile}">点击弹出预览</div></td>
							</tr> 
							${trmDom1} 
						</table>`;
						tableDom2 =
							`<table class="table" style="margin-bottom: 0;">
								<thead>
									<tr>
										<th style="text-align:left;">属性中文名称</th>
										<th style="text-align:left;">属性值</th>
									</tr>
								</thead>
								<tbody>
									${trmDom2}
								</tbody>
							</<table>`;
						tableDom3 =
							`<table class="table" style="margin-bottom: 0;">
								<tr>
								<th>养护单位</th><td> ${dataJson.fMaintainofficeName || '--'}</td>
								<th>巡查单位</th><td> ${dataJson.fPatrolofficeName || '--'} </td>
								${mDom3}
								</tr> 
								${trmDom3} 
							</<table>`;
						tableDom4 =
							`<table class="table" style="margin-bottom: 0;">
								<tr>
									<th>财务卡片编码</th><td> ${dataJson.fFinCode || '--'}</td>
									<th>财务资产名称</th><td> ${dataJson.fFinName || '--'} </td>
									<th>资产原值</th><td> ${dataJson.fValue || '--'} </td>
								</tr> 
								<tr>
									<th>竣工交付资产价值</th><td> ${dataJson.fDeliveryValue || '--'}</td>
									<th>累计折旧</th><td> ${dataJson.fUndertakeDep || '--'} </td>
									<th>已计提月份</th><td> ${dataJson.fCountingMonth || '--'} </td>
								</tr>
								<tr>
									<th>减值准备</th><td> ${dataJson.fDepreciation || '--'}</td>
									<th>净值</th><td> ${dataJson.fNetValue || '--'} </td>
									<th>净残值</th><td> ${dataJson.fNetSalvageValue || '--'} </td>
								</tr> 
								${trmDom4}
							</<table>`;
						tableDom5 =
							`<table class="table" style="margin-bottom: 0;">
								<tr>
									<th>百度经度</th><td> ${dataJson.fBDLon || '--'}</td>
									<th>百度纬度</th><td> ${dataJson.fBDLat || '--'} </td>
									<th>经度</th><td> ${dataJson.fLon || '--'} </td>
								</tr> 
								<tr>
									<th>纬度</th><td> ${dataJson.fLat || '--'}</td>
									<th>位置</th><td> ${dataJson.fLocation || '--'} </td>
									${mDom5}
								</tr>
								${trmDom5}
							</<table>`;
						log = dataJson.fBDLon;
						lat = dataJson.fBDLat;

					}

					$('#menu1').html(tableDom1);
					$('#menu2').html(tableDom2);
					$('#menu3').html(tableDom3);
					$('#menu4').html(tableDom4);
					$('#menu5').html(tableDom5);
					if (tableDom5 !== '' && window.baidudituIsInit === true) {
						$('#menu5').show();
						let dituHeight = $('.model-con').height() - $('#menu5 table').height() - 40;
						$('#menu5').hide();
						$('#menu5').attr('blng', log);
						$('#menu5').attr('blat', lat);
						$('#menu5').append(`<div  style="height:${dituHeight+'px'}"  id="baidudituDom"></div>`);
						baiduMap = new BMap.Map("baidudituDom"); // 创建Map实例

						var myIcon = new BMap.Icon("../../img/s-q.png", new BMap.Size(30, 30));
						var marker = new BMap.Marker(new BMap.Point(log, lat), {
							icon: myIcon
						}); // 创建标注
						baiduMap.addOverlay(marker);
						baiduMap.centerAndZoom(new BMap.Point(log, lat), 15); // 初始化地图,设置中心点坐标和地图级别
						baiduMap.enableScrollWheelZoom(true); //开启鼠标滚轮缩放
						baiduMap.setMapStyleV2({
							styleJson: mapStyle
						});
						baiduMap.addControl(
							new BMap.MapTypeControl({
								mapTypes: [BMAP_NORMAL_MAP, BMAP_HYBRID_MAP]
							})
						);
					}
				});
		}
	</script>
</body>

</html>